/*
 * Copyright © 2017 eqxiu.com 北京中网易企秀科技有限公司  All rights reserved.
 */

package cn.hermit.pagination;

import java.io.Serializable;

/**
 * @author JackGao 高建国
 * @description //TODO 设计说明
 * @date 12/5/2017
 */
public class PageForm implements Serializable {

    private static final long serialVersionUID = -7015627316844998357L;

    //from 1
    private int pageNo;

    private int pageSize;

    //for sql
    private String orderBy;

    private PageForm() {

    }

    public static PageForm create(int pageNo, int pageSize) {
        PageForm form = new PageForm();
        form.pageNo = pageNo;
        form.pageSize = pageSize;
        return form;
    }

    public static PageForm create(int pageNo, int pageSize, String orderBy) {
        PageForm form = new PageForm();
        form.pageNo = pageNo;
        form.pageSize = pageSize;
        form.orderBy = orderBy;
        return form;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }
}
